import axios from 'axios'
export const ConstructionMaintenanceService = class ConstructionMaintenanceService {
    static constructionMaintenanceService = null

    static getInstance() {
        if (this.constructionMaintenanceService == null) {
            this.constructionMaintenanceService = new ConstructionMaintenanceService()
        }
        return this.constructionMaintenanceService
    }


    save(progress){  //提交
        var params={}
        params.outputProgressPlan=progress
        return axios.post('http://localhost/buildlistmaintain',params.outputProgressPlan)
    }

    saveBeach(OutputProgressPlanSubs){//批量提交子目

        var OutputProgressPlanSub={}
        OutputProgressPlanSubs.forEach(item=>{
            OutputProgressPlanSub=item
        })
        return axios.post(
            'http://localhost/buildlistmaintain/buildlistmaintainSub',OutputProgressPlanSub)

    }

    list(params){//查询
        return axios.get(
            'http://localhost/buildlistmaintain',{params})
    }
}